package com.yunshang.shoppingmall.service.impl;

import com.yunshang.shoppingmall.entity.Freight;
import com.yunshang.shoppingmall.mapper.FreightMapper;
import com.yunshang.shoppingmall.service.FreightService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;

@Service("FreightService")
public class FreightServiceImpl implements FreightService {

    @Autowired
    FreightMapper freightMapper;
    @Override
    public int deleteByPrimaryKey(Integer id) {
        return freightMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Freight record) {
        return freightMapper.insert(record);
    }

    @Override
    public int insertSelective(Freight record) {
        return 0;
    }

    @Override
    public Freight selectByPrimaryKey(Integer id) {
       return freightMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(Freight record) {
        return  freightMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Freight record) {
       return  freightMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<Freight> selectAll() {
        return freightMapper.selectAll();
    }

    @Override
    public Freight selectFreight(Double weight, String ids) {
        return freightMapper.selectFreight(weight,ids);
    }

    @Override
    public List<Freight>  selectFreight1(String ids) {
        return freightMapper.selectFreight1(ids);
    }
}
